home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Utilities Professional 1-1500
/
Utilities Professional 1-1500 (1994)(WPD)[!].iso
/
12511500
/
var1336.dms
/
var1336.adf
/
Drive_INF
/
£.PTRAIN
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1989-10-20
|
6KB
|
287 lines
<>&E00
:?&E04=244
* (C) Anita Straker
mode(1)
initialise:
title
mode(7):
options:
CH=4
info:
mode(1):
19,1,4;0;19,2,3;0;:
CH=1
19,1,1;0;19,2,2;0;
CH=3
19,1,2;0;19,2,1;0;
numbers
11:M%(K)=0:
c(" Fill the train with "+
(tot)+" people",2,W$)
line(NT)
CLS(27)
total=0:
130:total=total+M%(K):
(total),4,DO+2,
128):
total<>tot
28,0,4,39,0,12,26:
c(" That's "+
(total),2,R$):
return:
CLS(28)
28,0,4,39,0,12,26:
total=tot
reward
c("Here's one way",2,W$):
correct
space
return
CLS(28):
b("Press",13,28,W$):
b("RETURN",19,28,
130):*FX15
WAIT(T)
(100*T):
space
10,28)" Press the SPACE bar ":
320,128:
1052,128:
G=32:
c(wx$,Y,COL$):
b(wx$,
((40-
(wx$))/2)-2,Y,COL$):
arrow(I1,I2)
*FX15,0
I0=I1
I0=I2
CLS(D%)
28,0,d%,39,D%,12,26
23;11,0;0;0;0:
23;11,255;0;0;0:
mode(N1)
off:d%=24:
N1<5 d%=31
*FX 4,0
*FX 12,0
"INDEX":
" in line ";
options
b("Choice Page",14,1,G$):
b("You can:",0,4,W$)
b("A "+W$+"play the easy game",0,7,G$)
b("B "+W$+"play the average game",0,9,G$)
b("C "+W$+"play the hard game",0,11,G$)
b("D "+W$+"see the notes",0,13,G$)
b("E "+W$+"stop",0,15,G$)
b("Type a letter then"+G$+"RETURN",0,20,W$)
BOX1(3,32,19,W$)
35,21);:
(IN$)-64:
numbers
!F=-5*(CH=1)-9*(CH=2)-9*(CH=3)
(F):B=
(C=B
CH=1 NT=3+
NT=6+
!F=-3*(CH=1)-4*(CH=2)-5*(CH=3)
)A1=
CH<3 B1=NT-A1:C1=0:C=0:
A1+B1>=NT
C1=NT-(A1+B1)
tot=A1*A+B1*B+C1*C
b(A$,X,Y,cl$)
(cl$)-128
N:A%=135:
(&FFF4)
&FF0000)
&10000=7
2A%=&A:X%=0:Y%=&A:D=&A00:
(A$):B$=
A$,N,1)
(B$):
(&FFF1)
23,254,0,D?1,D?1,D?2,D?2,D?3,D?3,D?4:
23,255,D?4,D?5,D?5,D?6,D?6,D?7,D?7,D?8
X+N+1,Y)
X+N+1,Y+1)
X,Y)DH$cl$A$
X,Y+1)DH$cl$A$;
on:*FX15,1
"AaBbCcDdEe",
):Q=(1+Q)
(Q+64)
b(IN$,
-1,G$)
Q=127
b(" "+
-1,W$):
Q=13
BOX1(LL,X1,Y2,col$)
BOXcol=
(col$)+16
X1-1,Y2);
BOXcol,183,163:
163,235
X1-2,Y2+1);:
141BOXcol,181,32:
BOXcol,234
Y2=Y2+1:
X1-1,Y2+1);
BOXcol,245,240:
240,250
title
TL$="PLAY TRAIN"
*FX 4,1
*FX 11,0
line(3):
reward
c(TL$,19,W$)
11,26)"Sound on (Y or N)? ";
"YyNn",
Q=(1+Q)
*FX210,1
*FX210,0
c(TL$,1,G$)
b("In this game you must fill carriages",0,4,W$):
b("on a train with people. You must put",0,6,W$):
b("some people in EACH carriage, and you",0,8,W$):
b("can only use the given numbers.",0,10,W$)
c("REMEMBER",13,G$):
b("Press"+G$+"DELETE"+W$+"to rub out a number",0,16,W$):
b("Press"+G$+"RETURN"+W$+"when your train is ready",0,18,W$)
b("Press"+G$+"ESCAPE"+W$+"to return to"+G$+"Choice Page",0,20,W$)
b("Press"+R$+"_]"+W$+"to go on",9,23,W$):
arrow(137,137)
carriage(x1,y1)
x1,y1)TR$;:
"OO OO"
num(x1,y1,N)
(N),x1+1,y1+3,
x1+1,y1+1)P$(N)
line(tt)
t=tt:
t>7 DO=5
DO=9
AC%=4
AC%,DO)EG$:
carriage(AC%+9*K,DO):
:b%=4:
t<7 b%=t-3
xx=1232:yy=1023-(DO+3)*32
xx+4*k,yy:
xx+4*k,yy-8*32:
carriage(AC%+36-9*K,DO+8):
carriage(AC%+9*(K-1),DO+16):
)1?xx=AC%*32-36:yy=yy-8*32:
xx+4*k,yy:
xx+4*k,yy-8*32:
T=1:c=0:ro=2:co=1:s%=1
c=NT
return
c=NT
(G<>13
G<>127)
G=127
c=NT
CLS(28):
G=127
G=127
G-48=A
G-48=B
(CH=3
G-48=C)
(G=13
c=NT)
num(AC%+9*(ro-1),DO+8*(co-1),G-48)
3,%c=c+1:M%(c)=G-48:
c=NT+1
369M%(c)=0:c=c-1:t%=-s%:ro=ro+t%:
ro=5 ro=4:s%=1:co=co-1
ro=0 ro=1:s%=-1:co=co-1
carriage(AC%+9*(ro-1),DO+8*(co-1)):
A:ro=ro+s%:
ro=5 ro=4:s%=-1:co=co+1
ro=0 ro=1:s%=1:co=co+1
CH<3 ME$="You can use "+
(A)+" or "+
ME$="You can use "+
(A)+", "+
(B)+" or "+
c(ME$,28,W$):
reward:
1,-15,150,5:
1,0,100,1:
1,-15,150,10:G=
(100):YY=1023-32*(DO-3):
32*(4+6*(K-1)),YY:
242,243,244,8,8,8,10,245,32,246,8,8,8,10,247,248,249
0,-15,100,2:
0,0,180,2:G=
(100/K):YY=YY+16:
correct
line(NT)
F_!co=1:ro=2:s%=1:
A1>0
B(A1,A)
B1>0
B(B1,B)
C1>0
B(C1,C)
(tot),4,DO+2,
B(D1,D2)
num(AC%+9*(ro-1),DO+8*(co-1),D2):
WAIT(1):
initialise
N>,TM=3.5:
* Basic time of warning messages
KT=TM:CH=0
NR7R$=
129:G$=
129:W$=
135:B$=
132:DH$=
* Colours
23,225,240,240,240,240,240,240,240,240,23,226,0,0,0,0,0,255,255,255,23,228,15,15,15,15,15,15,15,15,23,229,240,240,240,240,240,255,255,255,23,230,15,15,15,15,15,255,255,255,23,253,255,255,255,255,255,255,255,255
23,252,56,124,214,254,214,108,56,0,23,232,255,255,255,255,0,0,0,0,23,233,0,0,0,31,31,31,31,31
23,242,0,0,0,0,0,0,7,4,23,243,0,0,0,0,120,135,0,0,23,244,0,0,0,0,128,64,48,8,23,245,4,4,8,8,8,4,8,8,23,246,4,4,4,4,8,16,16,16,23,247,4,2,3,0,0,0,0,0,23,248,0,0,198,57,0,0,0,0,23,249,32,64,64,128,0,0,0,0
&S0$=
226):S2$=
225+" "+
10:CH$=
OL?TR$=S0$+BD$+S2$+BD$+S2$+BD$+
229+CH$+
8+BD$+CH$+BD$
OVwEG$=
233+" "+
232+" "+BD$+
253)+" "+
228+BD$+
253)+BD$+
253)+
8+BD$+
253)+BD$+"OOO OO"
P$(9):BD$=
10:P$(1)=" "+BD$+" "+
252:P$(2)=" "+BD$+" "+
252:P$(3)=" "+BD$+" "+
252+" "+
252:P$(4)=" "+BD$+
252)::P$(5)=" "+
252+" "+BD$+" "+
V$,4):P$(6)=" "+
252+" "+BD$+V$:P$(7)=" "+
252+" "+BD$+V$:P$(8)=" "+
252+" "+
252+BD$+V$:P$(9)=" "+
V$,4)+BD$+V$
M%(12)
*TAPE
I%=0
4:I%!&E00=I%!
"?&13=?&13-(
-&E00)
256:
=&E00